﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonTools;
using FreeSql.DataAnnotations;

namespace Gtong.MODEL
{
    /// <summary> 系统配置 </summary>
    public partial class JSystemProfile : IFastTree
    {

        /// <summary> 系统配置, 全局静态 </summary>
        [Column(IsIgnore =true)]
        public static JSystemProfile Profile { set; get; } = new JSystemProfile();


        [Column(IsIgnore =true)]
        public string Code => this.FCode;

        [Column(IsIgnore =true)]
        public string NodeText => this.FCode + " " + this.FName;



        /// <summary> 构造函数 </summary>
        public JSystemProfile()
        {
            //默认值 
            this.StartUsingPeriod = 1;
            this.StartUsingYear = 2019;
            this.CurrentPeriod = DateTime.Today.Month;
            this.CurrentYear = DateTime.Today.Year;
            this.QtyAccuracy = 2;
            this.UPAccuracy = 2;
            this.Company = "中信软件";
            this.TaxRegistrationNo = "";
            this.BankAC = "";
            this.OpeningBank = "";
            this.Address = "";
            this.Tel = "";
            this.Fax = "";
            this.DocListMaxRow = 1000;
            this.OnlyOwnDocEditable = true;

        }

        /// <summary> 启用会计年度 </summary>
        [Column(IsIgnore =true)]
        public int StartUsingYear { set; get; }

        /// <summary>启用会计期间 </summary>
        [Column(IsIgnore =true)]
        public int StartUsingPeriod { set; get; }

        /// <summary> 当前会计年度 </summary>
        [Column(IsIgnore =true)]
        public int CurrentYear { set; get; }

        /// <summary> 当前会计期间</summary>
        [Column(IsIgnore =true)]
        public int CurrentPeriod { set; get; }

        /// <summary>数量小数位 </summary>
        [Column(IsIgnore =true)]
        public int QtyAccuracy { set; get; }

        /// <summary>单价小数位 </summary>
        [Column(IsIgnore =true)]
        public int UPAccuracy { set; get; }

        /// <summary>公司名称 </summary>
        [Column(IsIgnore =true)]
        public string Company { set; get; }

        /// <summary>税号 </summary>
        [Column(IsIgnore =true)]
        public string TaxRegistrationNo { set; get; }

        /// <summary>银行账号 </summary>
        [Column(IsIgnore =true)]
        public string OpeningBank { set; get; }

        /// <summary> 账号 </summary>
        [Column(IsIgnore =true)]
        public string BankAC { set; get; }

        /// <summary> 地址 </summary>
        [Column(IsIgnore =true)]
        public string Address { set; get; }

        /// <summary>电话 </summary>
        [Column(IsIgnore =true)]
        public string Tel { set; get; }

        /// <summary>传真 </summary>
        [Column(IsIgnore =true)]
        public string Fax { set; get; }

        /// <summary>序时簿最大行数 </summary>
        [Column(IsIgnore =true)]
        public int DocListMaxRow { set; get; }

        /// <summary>只能修改本人录入的单据 </summary>
        [Column(IsIgnore =true)]
        public bool OnlyOwnDocEditable { set; get; }


        /// <summary> 本位币代码 </summary>
        [Column(IsIgnore =true)]
        public string LocalCurrencyCode { set; get; } = "";

        /// <summary> 本位币名称 </summary>
        [Column(IsIgnore =true)]
        public string LocalCurrencyName { set; get; } = "";

        /// <summary> 本位币小数位 </summary>
        [Column(IsIgnore =true)]
        public int LocalCurrencyDecimals { set; get; } = 2;

        /// <summary> 账套是否启用 </summary>
        [Column(IsIgnore =true)]
        public bool AcsetEnable { set; get; } = false;

        /// <summary> 本年利润科目 </summary>
        [Column(IsIgnore =true)]
        public string CurrentYearProfits { set; get; } = "";

        /// <summary> 本年利润科目代码 </summary>
        [Column(IsIgnore =true)]
        public string CurrentYearProfitsId { set; get; } = "";

        /// <summary> 利润分配科目 </summary>
        [Column(IsIgnore =true)]
        public string ProfitDistibution { set; get; } = "";

        /// <summary> 利润分配科目代码 </summary>
        [Column(IsIgnore =true)]
        public string ProfitDistibutionId { set; get; } = "";


        /// <summary> 以前年度损益调整 </summary>
        [Column(IsIgnore =true)]
        public string PriorYearIncomeAdjustment { set; get; } = "";

        /// <summary> 以前年度损益调整Id </summary>
        [Column(IsIgnore =true)]
        public string PriorYearIncomeAdjustmentId { set; get; } = "";


    }
}
